#include "maple_loop.h"

int main(int argc, char** args){

	strLinklist* sl1 = new_strLinklist("x = y+1");
	strLinklist* sl2 = new_strLinklist("y = x+y+1");
	sl1->next = sl2;

	elseNode* body = new_elseNode("x^2>y", sl1);

	loopNode* loop = new_loopNode("y>x", body);

	FILE *maplefile = fopen(args[1],"w");
    if (!maplefile){
	  		printf("The file %s can not be open!", args[1]);
	  		exit(CANT_WRITE_MAPLE_FILE);
	}



	fprint_loopNode(maplefile, loop);
    fclose(maplefile);
	
	free_loopNode(loop);
    return 0;
}


